home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / vibrant / ncbiport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  3.7 KB  |  144 lines  |  [TEXT/R*ch]

  1. /*   ncbiport.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE
  5. *            National Center for Biotechnology Information (NCBI)
  6. *
  7. *  This software/database is a "United States Government Work" under the
  8. *  terms of the United States Copyright Act.  It was written as part of
  9. *  the author's official duties as a United States Government employee and
  10. *  thus cannot be copyrighted.  This software/database is freely available
  11. *  to the public for use. The National Library of Medicine and the U.S.
  12. *  Government do not place any restriction on its use or reproduction.
  13. *  We would, however, appreciate having the NCBI and the author cited in
  14. *  any work or product based on this material
  15. *
  16. *  Although all reasonable efforts have been taken to ensure the accuracy
  17. *  and reliability of the software and data, the NLM and the U.S.
  18. *  Government do not and cannot warrant the performance or results that
  19. *  may be obtained by using this software or data. The NLM and the U.S.
  20. *  Government disclaim all warranties, express or implied, including
  21. *  warranties of performance, merchantability or fitness for any particular
  22. *  purpose.
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  ncbiport.h
  27. *
  28. * Author:  Jonathan Kans
  29. *
  30. * Version Creation Date:   1/1/91
  31. *
  32. * $Revision: 2.2 $
  33. *
  34. * File Description: 
  35. *       Vibrant drawing port specification definitions
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. *
  42. *
  43. * ==========================================================================
  44. */
  45.  
  46. #ifndef _NCBIPORT_
  47. #define _NCBIPORT_
  48.  
  49. #ifndef _NCBI_
  50. #include <ncbi.h>
  51. #endif
  52. #ifndef _NCBIDRAW_
  53. #include <ncbidraw.h>
  54. #endif
  55. #ifndef _NCBIWIN_
  56. #include <ncbiwin.h>
  57. #endif
  58.  
  59. #ifdef __cplusplus
  60. extern "C" {
  61. #endif
  62.  
  63. #ifdef WIN_MAC
  64. #define Nlm_PointTool Point
  65. #define Nlm_RectTool Rect
  66. #define Nlm_RgnTool RgnHandle
  67. #define Nlm_FontTool Nlm_Handle
  68. #endif
  69.  
  70. #ifdef WIN_MSWIN
  71. #define Nlm_PointTool POINT
  72. #define Nlm_RectTool RECT
  73. #define Nlm_RgnTool HRGN
  74. #define Nlm_FontTool HFONT
  75. #endif
  76.  
  77. #ifdef WIN_X
  78. #define Nlm_PointTool XPoint
  79. #define Nlm_RectTool XRectangle
  80. #define Nlm_RgnTool Region
  81. #define Nlm_FontTool XFontStruct*
  82. #endif
  83.  
  84. /* The font structure is created using a handle.  The FntPtr is
  85. *  returned by a call to Nlm_HandLock (font).  Be sure to call
  86. *  Nlm_HandUnlock (font) after obtaining the font handle.
  87. */
  88.  
  89. typedef  struct  Nlm_fontrec {
  90.   Nlm_FonT      next;
  91.   Nlm_Char      name [32];
  92.   Nlm_Int2      size;
  93.   Nlm_Int2      scale;
  94.   Nlm_Boolean   bld;
  95.   Nlm_Boolean   ital;
  96.   Nlm_Boolean   undlin;
  97.   Nlm_Int2      number;
  98.   Nlm_Int2      style;
  99.   Nlm_FontTool  handle;
  100.   Nlm_FonT      print;
  101. } Nlm_FontRec, Nlm_FontData, PNTR Nlm_FntPtr;
  102.  
  103. extern Nlm_Boolean  Nlm_nowPrinting;
  104.  
  105. #ifdef WIN_MAC
  106. extern  RGBColor  Nlm_RGBforeColor;
  107. extern  RGBColor  Nlm_RGBbackColor;
  108. #endif
  109.  
  110. #ifdef WIN_MSWIN
  111. extern  HWND  Nlm_currentHWnd;
  112. extern  HDC   Nlm_currentHDC;
  113. #endif
  114.  
  115. #ifdef WIN_X
  116. extern  Display    *Nlm_currentXDisplay;
  117. extern  int        Nlm_currentXScreen;
  118. extern  Window     Nlm_currentXWindow;
  119. extern  GC         Nlm_currentXGC;
  120. extern  Nlm_Uint4  Nlm_XbackColor;
  121. extern  Nlm_Uint4  Nlm_XforeColor;
  122. extern  Nlm_Int2   Nlm_XOffset;
  123. extern  Nlm_Int2   Nlm_YOffset;
  124. extern Nlm_RegioN  Nlm_clpRgn;
  125. #endif
  126.  
  127. #ifdef WIN_MAC
  128. void  Nlm_SetPort PROTO((GrafPtr grafptr));
  129. #endif
  130.  
  131. #ifdef WIN_MSWIN
  132. void  Nlm_SetPort PROTO((HWND hwnd, HDC hdc));
  133. #endif
  134.  
  135. #ifdef WIN_X
  136. void  Nlm_SetPort PROTO((Window window, GC gc));
  137. #endif
  138.  
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142.  
  143. #endif
  144.